import Vue from 'vue'
// import asios from '@/plugins/axios'

export function axiosGetToken (data) {
  return Vue.axios({
    url: '/svclog/v1/autho/get-token',
    method: 'post',
    data: data,
    headers: { 'Content-Type': 'application/json;charset=UTF-8' },
  })
}

export function axiosCheckHeartbeat (data, token) {
  return Vue.axios({
    url: '/svclog/v1/autho/heartbeat',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'X-Auth-Token': token,
    },
  })
}

export function axiosWsConn (data, token) {
  return Vue.axios({
    url: '/svclog/v1/ws',
    method: 'get',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'X-Auth-Token': token,
    },
  })
}
